/*******************************************************************************
 * Copyright (c) 2019, 2025 Lablicate GmbH.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 * Alexander Stark - initial API and implementation
 * Alexander Kerner - serialization
 *******************************************************************************/
package org.eclipse.chemclipse.nmr.processing.supplier.base.core;

import java.io.Serializable;
import java.math.BigDecimal;

import org.apache.commons.math3.complex.Complex;
import org.eclipse.chemclipse.nmr.model.core.ISignalFID;

public class ComplexFIDSignal implements ISignalFID, Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1324819102443373298L;
	private Complex complex;
	private BigDecimal time;

	public ComplexFIDSignal(BigDecimal time, Complex complex) {

		this.time = time;
		this.complex = complex;
	}

	@Override
	public BigDecimal getSignalTime() {

		return time;
	}

	@Override
	public Number getRealComponent() {

		return complex.getReal();
	}

	@Override
	public Number getImaginaryComponent() {

		return complex.getImaginary();
	}
}
